﻿<%@ Page Language="C#" MasterPageFile="~/Index.Master" AutoEventWireup="true" CodeBehind="PhoneBookManager.aspx.cs"
    Inherits="Web.manager.PhoneBookManager" %>

<%@ Register Src="~/controls/message.ascx" TagName="message" TagPrefix="uc" %>
<%@ Register Src="~/Controls/GVPageManager.ascx" TagPrefix="ui" TagName="gv" %>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form id="form1" runat="server">
    <div class="content-box">
        <!-- Start Content Box -->
        <div class="content-box-header">
            <h3>
                通讯录管理</h3>
            <div class="clear">
            </div>
        </div>
        <!-- End .content-box-header -->
        <div class="content-box-content">
            <div class="tab-content default-tab" id="tab1">
                <div class="form">
                    <p>
                        <div>
                            <label>
                                集团名称：</label>
                            <asp:TextBox ID="txb_keyword" CssClass="text-input small-input" runat="server"></asp:TextBox>
                            &nbsp;
                            <asp:Button ID="btn_query" CssClass="button" runat="server" Text="查询" OnClick="btn_query_Click" />
                            <asp:Button ID="btn_export" CssClass="button" runat="server" Text="导出" OnClick="btn_export_Click" />
                        </div>
                    </p>
                </div>
                <uc:message ID="u_message" Visible="false" runat="server" />
                <asp:GridView ID="GridView1" AutoGenerateColumns="False" runat="server" DataKeyNames="groupid,enabled"
                    OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound">
                    <Columns>
                        <%--<asp:BoundField DataField="groupname" HeaderText="集团名称" SortExpression="groupname" />--%>
                        <asp:TemplateField HeaderText="集团名称">
                            <ItemTemplate>
                                <%--<asp:LinkButton ID="lkb_enabled" CommandName="enabled" CommandArgument='<%#Eval("groupid") %>' runat="server" Text='<%#Eval("enabled").ToString()=="0"?"暂停":"正常" %>'></asp:LinkButton>--%>
                                <asp:HyperLink ID="hl_phonebook" runat="server" NavigateUrl='<%# "PhoneBookView.aspx?groupid=" + Eval("groupid") %>'><%#Eval("groupname")%></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="usenum" HeaderText="集团使用人数" />
                        <asp:BoundField DataField="totalnum" HeaderText="集团规模" />
                        <asp:BoundField DataField="phone" HeaderText="电话" />
                        <asp:BoundField DataField="fax" HeaderText="传真" />
                        <asp:TemplateField HeaderText="是否暂停">
                            <ItemTemplate>
                                <asp:LinkButton ID="lkb_enabled" CommandName="enabled" CommandArgument='<%#Eval("groupid") %>' runat="server" Text='<%#Eval("enabled").ToString()=="0"?"暂停":"正常" %>'></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="管理">
                            <ItemTemplate>
                                <asp:ImageButton ID="btn_update" ImageUrl="~/resources/images/icons/pencil.png" AlternateText="修改"
                                    CommandName="update" runat="server" CommandArgument='<%#Eval("groupid") %>' />
                                <asp:ImageButton ID="btn_del" ImageUrl="~/resources/images/icons/cross.png" AlternateText="删除"
                                    CommandName="del" runat="server" OnClientClick="return confirm('确认要进行删除吗')" />
                                <a href='operator.aspx?groupid=<%#Eval("groupid") %>' title="操作员管理">
                                    <img src='<%#ResolveUrl("~/resources/images/icons/hammer_screwdriver.png") %>' alt="操作员管理" /></a>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <ui:gv ID="GV" runat="server" />
            </div>
            <!-- End #tab1 -->
        </div>
        <!-- End .content-box-content -->
    </div>
    </form>
</asp:Content>
